/*
 * @Author: yingzi
 * @Date: 2023-09-20 21:10:59
 * @LastEditors: yingzi
 * @LastEditTime: 2023-09-21 20:35:10
 * @Description: 请填写简介
 */
import Vue from 'vue'
import App from './App.vue'


//引入Vuex
import Vuex from 'vuex'
import store from "./store";
//引入VueRouter
import VueRouter from 'vue-router'
import router from "./router";


import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import "./assets/css/index.scss";
import "./assets/icons/index.js";



//关闭Vue的生产提示
Vue.config.productionTip = false


//应用Vuex插件
Vue.use(Vuex);
//应用插件
Vue.use(VueRouter);
//应用插件
Vue.use(ElementUI);


// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题

// src/router/index.js
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (to) {
  return VueRouterPush.call(this, to).catch(err => err)
}
const originalReplace = VueRouter.prototype.replace;
VueRouter.prototype.replace = function replace(location) {
  return originalReplace.call(this, location).catch(err => err);
};





//创建vm
new Vue({
  render: h => h(App),
  store,
  router:router
}).$mount('#app')
